package com.example.riskmanage.controller;


import com.example.riskmanage.bean.NHistorylist;
import com.example.riskmanage.service.NHistorylistManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class NHistorylistController {
    @Autowired
    NHistorylistManager nhistorylistManager;

    @RequestMapping("/nhistorylist")
    public String nhistorylist(Integer id) {


        String RESPONE = nhistorylistManager.getNHistorylistService(id);
        return RESPONE;

    }

    @RequestMapping("/cmhistorylist")
    public String cm(NHistorylist nhistorylist) {

        String flag = nhistorylistManager.addNHistorylistService(nhistorylist);
        return flag;
    }

    @RequestMapping("/deletenhistorylist")
    public String delete(Integer id) {
        String flag = nhistorylistManager.deleteNHistorylistService(id);
        return flag;
    }
}
